package CaseTraining;

import java.util.Random;
import java.util.Scanner;

public class CaseDemo06_1 {
    public static void main(String[] args) {
        int[] moneys = {520, 99, 1314, 66, 88,100};
        start(moneys);
    }
    public static void start(int[] moneys){
        //将元素顺序打乱
        Random r = new Random();
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < moneys.length; i++) {
            int temp = moneys[i];
            int index = r.nextInt(moneys.length);
            moneys[i] = moneys[index];
            moneys[index] = temp;
        }
        for (int i = 0; i < moneys.length; i++) {
            System.out.println("请您输入任意内容进行抽奖");
            sc.next();
            int money = moneys[i];
            System.out.println("您抽中的红包是" + money + "元");
        }
        System.out.println("活动结束啦！");
    }
}
